<div class="<?php echo ($this->isUserLogedIn() ? 'grid_12' : 'grid_16')?>" >
    <div class="box articles ">
        <h2>
            <a id="toggle-articles" href="#" class="visible"><?php echo $this->gallery->title ;?></a>
        </h2>
        <div id="articles" class="block" style="margin: 0px;">
            <?php
            if($this->getPhotoService() != null){
                $photos = $this->photoService->getByGalleryId($this->gallery->id);
                if($photos != null){
                    foreach ($photos as $photo) { ?>

            <div class="article">
                <?php if($photo->title != null){ ?>
                <h3><a href="#"><?php echo $photo->title;?></a></h3>
                <?php }?>
            <?php if($photo->created != null){ ?>
                <p class="meta"><?php echo $photo->created; ?></p>
                <?php }?>
                <a class="image" href="<?php echo $photo->maxi; ?>"  title="Nuotrauka">
                    <img  alt="" src="<?php echo $photo->mini; ?>"/>
                </a>
                <?php if($photo->description != null){ ?>
                <p><?php echo $photo->description; ?></p>
                <?php }?>
            </div>

                 <?php }}} ?>
        </div>
    </div>
</div>
